package com.ts.api.manage.search;

import com.ts.framework.domain.course.CoursePub;
import com.ts.framework.domain.course.TeachplanMediaPub;
import com.ts.framework.domain.search.CourseSearchParam;
import com.ts.framework.model.response.QueryResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.Map;

@Api(tags = "课程搜索接口", description = "负责课程搜索")
public interface EsCourseControllerApi {

    @ApiOperation("课程搜索")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页面", dataType = "Integer", paramType = "path"),
            @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer", paramType = "path"),
            @ApiImplicitParam(name = "courseSearchParam", value = "参数信息", dataType = "String", paramType = "body"),

    })
    public QueryResponseResult search(Integer page, Integer size, CourseSearchParam courseSearchParam);

    @ApiOperation("根据课程Id从索引库中获取课程信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程Id", name = "id", paramType = "path", dataType = "String", required = true)
    })
    public Map<String, CoursePub> getAllCourseById(String id);

    @ApiOperation("根据课程计划查询媒资信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程计划Id", name = "teachplanId", paramType = "path", dataType = "String", required = true)
    })
    public TeachplanMediaPub getmedia(String teachplanId);
}